#/*
# * Copyright 2017 ~ 2025 the original author or authors. <wanglsir@gmail.com, 983708408@qq.com>
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# *      http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */
export REDIS_HOME=/usr/lib/redis-current
export REDIS_BIN_DIR="${REDIS_HOME}/bin"
export REDIS_CONF_DIR="${REDIS_HOME}/conf"
export REDIS_NODE_DIR="${REDIS_HOME}/node"
export REDIS_RUN_DIR="${REDIS_HOME}/run"
export REDIS_DATA_DIR=/mnt/disk1/redis
export REDIS_LOG_DIR=/mnt/disk1/log/redis
export REDIS_USER=wanglsir
export REDIS_GROUP=wanglsir
export PATH=$PATH:$REDIS_BIN_DIR

# Ensure requires directory.
[ ! -d "$REDIS_BIN_DIR" ] && mkdir -p ${REDIS_BIN_DIR}
[ ! -d "$REDIS_CONF_DIR" ] && mkdir -p ${REDIS_CONF_DIR}
[ ! -d "$REDIS_NODE_DIR" ] && mkdir -p ${REDIS_NODE_DIR}
[ ! -d "$REDIS_RUN_DIR" ] && mkdir -p ${REDIS_RUN_DIR}
[ ! -d "$REDIS_DATA_DIR" ] && mkdir -p ${REDIS_DATA_DIR}
[ ! -d "$REDIS_LOG_DIR" ] && mkdir -p ${REDIS_LOG_DIR}
